package com.sg.business.model.workevent;

import com.mobnut.db.model.IContext;
import com.sg.business.model.Work;
import com.sg.business.model.WorkEventNoticeRule;

public class CreateSubWorkEvent extends RuleBasedWorkEvent  {

	private Work childWork;

	public CreateSubWorkEvent(Work parentWork, Work childWork, IContext context) {
		super(parentWork, context);
		setRule(WorkEventNoticeRule.makeWorkEventNoticeRule(EVENT_CREATE_SUB_WORK));
		this.childWork = childWork;
		setParameter("childWork", childWork);
	}

	public Work getParentWork() {
		return (Work) getData();
	}

	public Work getChildWork() {
		return childWork;
	}

}
